package com.nuoniu.sibanyun.mapper.production;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.nuoniu.sibanyun.entity.production.ErpWorkProcedureCardMain;
import org.apache.ibatis.annotations.Select;

/**
 * <p>
 * 工序汇报——主表 Mapper 接口
 * </p>
 *
 * @author 白强
 * @since 2022-01-24
 */
public interface ErpWorkProcedureCardMainMapper extends BaseMapper<ErpWorkProcedureCardMain> {


    @Select("select voucher_code from ma_process_report where company_id=#{companyId} and date_format(create_date, #{dateStr})=date_format(now(), #{dateStr}) order by create_date desc limit 1")
    String getNewestCode(Integer companyId, String dateStr);


}
